<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.3&key=您申请的key值"></script>
		
	</head>
	<body>
		<script>
		var map = new AMap.Map('container', {
        resizeEnable: true,
        zoom:11,
        center: [longitude, latitude]

	//wechat,ticket lbs
		if (navigator && navigator.geolocation && navigator.geolocation.getCurrentPosition) {
			navigator.geolocation.getCurrentPosition(function(ret) {
				window.longitude = ret.coords.longitude;
	    		window.latitude = ret.coords.latitude;
			}, function(ret) {},
			{
				//开启高精度定位
				enableHighAccuracy : true,
				timeout : 2000,
				maximumAge : 300000
			});
		}
	 });
    </script>
	</body>
</html>
